#include "CreditsMenu.h"


CreditsMenu::CreditsMenu() {
}


CreditsMenu::~CreditsMenu() {
}




void CreditsMenu::Initialize(sf::RenderWindow* window) {
	m_renderWindow = window;

	CreditsTexture.loadFromFile("bilder/Menu/Credits_Screen.png");
	CreditsSprite.setTexture(CreditsTexture);

	BackTexture.loadFromFile("bilder/Options/back.png");
	BackSprite.setTexture(BackTexture);
	BackSprite.setOrigin(BackTexture.getSize().x/4,BackTexture.getSize().y/2);
	BackSprite.setPosition(1145,  675);
}

void CreditsMenu::Update(sf::Vector2i mousePos) {
	m_mousePos = mousePos;
	if (m_mousePos.x > 1032 && m_mousePos.x < 1262 && m_mousePos.y < 710 && m_mousePos.y > 638) {
		BackSprite.setTextureRect(sf::IntRect(148,0,148,58));
	}  else {
		BackSprite.setTextureRect(sf::IntRect(0,0,148,58));
	}

	m_renderWindow->draw(CreditsSprite);
	m_renderWindow->draw(BackSprite);

}

void CreditsMenu::Cleanup() {
}